package ForTest;

public class Circle {
    public final double PI = 3.1415926;

    private double r;


    public Circle(double r){
        if (r < 0.0) r = 1.0;
        this.r = r;
    }

    public void set_r(double r){
        if (r < 0.0) r = 1.0;
        this.r = r;
    }
    public double get_r(){
        return r;
    }

    public double get_S(){
        return r * r * PI;
    }
    public double get_C(){
        return 2 * r * PI;
    }
}
